<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:head>
</h:head>
<h:body>
	<h1>Client Request</h1>


	<h:form id="form">
		<p:growl id="msgs" showDetail="true" />
		<p:outputLabel value="Email :"></p:outputLabel>
		<p:inputText value="#{scr.clientEmail}" required="true" id="email"
			requiredMessage="Please enter your email address." label="email"
			validatorMessage="Invalid email format">
			<f:validateRegex
				pattern="^[_A-Za-z0-9-\+]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9]+)*(\.[A-Za-z]{2,})$" />

		</p:inputText>
		<p:watermark for="email" value="Email Address *" />
		<p:message for="email" />
		<br></br>
		<p:outputLabel value="add your Item "></p:outputLabel>
		<br></br>
		<br></br>
		<p:inputTextarea value="#{scr.inputItem}" required="true"
			requiredMessage="Please enter your email Item" label="Your Staff"></p:inputTextarea>
		<br></br>
		<br></br>
		<p:commandButton value="Add Item to List"
			action="#{scr.addInputedItemToTable}" ajax="false"
			update="shopclientrequirementId"></p:commandButton>
		<br></br>
		<br></br>
		<p:dataTable id="shopclientrequirementId"
			widgetVar="shopclientrequirementVar" var="sci"
			value="#{scr.clientItems}" editable="true" style="margin-bottom:20px">
			<f:facet name="header">
           Items
       </f:facet>


			<p:column>


				<p:inputText id="modelInput" value="#{sci.staff}" style="width:100%" />


			</p:column>

		</p:dataTable>

		<p:commandButton action="#{scr.saveClientRequirement}" value="Save"
			ajax="false"></p:commandButton>
	</h:form>
</h:body>
</html>